{php include wl_template('common/header');}
<div class="panel panel-default">
	<div class="panel-heading">积分余额设置</div>
	<div class="panel-body">
		<form action="" method="post" class="form-horizontal form" id="form">
			<div class="form-group">
				<label class="col-md-4 control-label">是否使用积分、余额？</label>
					<input class="flag" type="checkbox" name="credit_type" value="{$setting['credit_type']}" {if $setting['credit_type'] == 1}checked{/if} />
				</div>
			</div>
		</form>
	</div>
</div>
<script>
$(function(){
	require(['bootstrap.switch'],function($){
		$('.flag:checkbox').bootstrapSwitch({onText: '是', offText: '否'});
		$('.bootstrap-switch-wrapper').click(function(e){
			e.stopPropagation();
			$.post("{php echo web_url('member/member/ajax')}",function(d){
				if(!d.errno){
					util.tips(d.message);
				}
			},"json");
		});
		
	});
});
</script>
{php include wl_template('common/footer');}
